package com.red.basic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.red.basic.mapper.RedCustomFolderMapper;
import com.red.basic.domain.RedCustomFolder;
import com.red.basic.service.IRedCustomFolderService;

/**
 * 客户文件夹Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-10
 */
@Service
public class RedCustomFolderServiceImpl implements IRedCustomFolderService 
{
    @Autowired
    private RedCustomFolderMapper redCustomFolderMapper;

    /**
     * 查询客户文件夹
     * 
     * @param id 客户文件夹主键
     * @return 客户文件夹
     */
    @Override
    public RedCustomFolder selectRedCustomFolderById(Long id)
    {
        return redCustomFolderMapper.selectRedCustomFolderById(id);
    }

    /**
     * 查询客户文件夹列表
     * 
     * @param redCustomFolder 客户文件夹
     * @return 客户文件夹
     */
    @Override
    public List<RedCustomFolder> selectRedCustomFolderList(RedCustomFolder redCustomFolder)
    {
        return redCustomFolderMapper.selectRedCustomFolderList(redCustomFolder);
    }

    /**
     * 新增客户文件夹
     * 
     * @param redCustomFolder 客户文件夹
     * @return 结果
     */
    @Override
    public int insertRedCustomFolder(RedCustomFolder redCustomFolder)
    {
        return redCustomFolderMapper.insertRedCustomFolder(redCustomFolder);
    }

    /**
     * 修改客户文件夹
     * 
     * @param redCustomFolder 客户文件夹
     * @return 结果
     */
    @Override
    public int updateRedCustomFolder(RedCustomFolder redCustomFolder)
    {
        return redCustomFolderMapper.updateRedCustomFolder(redCustomFolder);
    }

    /**
     * 批量删除客户文件夹
     * 
     * @param ids 需要删除的客户文件夹主键
     * @return 结果
     */
    @Override
    public int deleteRedCustomFolderByIds(Long[] ids)
    {
        return redCustomFolderMapper.deleteRedCustomFolderByIds(ids);
    }

    /**
     * 删除客户文件夹信息
     * 
     * @param id 客户文件夹主键
     * @return 结果
     */
    @Override
    public int deleteRedCustomFolderById(Long id)
    {
        return redCustomFolderMapper.deleteRedCustomFolderById(id);
    }

    /**
     * 获取根目录
     * @return
     */
    @Override
    public List<RedCustomFolder> getRootFolder() {
        return redCustomFolderMapper.getRootFolder();
    }
}
